package ch.unisi.inf.editor;
import ch.unisi.inf.engine.*;

/**
 * this is the superclass of all kinds of filters, the filters can be applied invoking the apply(Image image) method
 * 
 * @author  matthias.eberli@lu.unisi.ch
 */
public abstract class Filter
{
    private final String name;

    /**
     * Create a new filter with a given name.
     * @param name The name of the filter.
     */
    public Filter(final String name)
    {
        this.name = name;
    }
    
    /**
     * Return the name of this filter.
     * @return  The name of this filter.
     */
    public String getName()
    {
        return name;
    }
    
    /**
     * Apply this filter to an image.
     * @param  image  The image to be changed by this filter.
     */
    public abstract void apply(final Image image);
}
